// 在user_storage.go中添加接口定义
package manager

import (
	"BlazeRider-backend/app/models"
)

type UserStorage interface {
	InitializeUser(userID, userName, headImg string, level int) error
	GetUser(userID string) (*UserInfo, error)
	RecordScore(userID string, score int) error
	SetUserScoreByLiveRoomResult() error
	SetUserLevelByLevelSet(levelSetArr map[int]LevelSet) error
	//SetAuth(liveRoomToken string) (*utils.LiveRoomUserInfo, string, error)
	//CheckAuth(liveRoomLoginToken string) (*utils.MyClaims, error)
	GetRanks() (*models.RankInfos, error)
	GetWorldRecords() (*models.WorldRecods, error)
}

// user_mysql_storage.go补全方法
func (s *userMySQLStorage) RecordScore(userID string, score int) error {
	return s.UpdateScore(userID, score) // 复用现有方法
}
